/**
 * Created by joustany on 17/12/11.
 */
function aliShare() {
    $.ajax({
        url: configApi('/coupon/share-coupon'),
        data: {
            no:order_no,
            access_token:redirect.token
        },
        dataType: 'json',
        type: "post",
    }).done(function (res) {
        console.log(res)
        if (res.success){
            var data = res.data
            var title = data.text.title,
                desc = data.text.desc,
                img = data.text.icon,
                shareId = data.link,
                link = window.location.origin + '/webApp/shareParams.html?lineLink='+ shareId +''
            $('.ali_title').attr('content',title)
            $('.ali_icon').attr('content',img)
            $('.ali_desc').attr('content',desc)
            $('.ali_link').attr('content',link)
        }else {
            layer.open({
                content: res.message
                ,skin: 'msg'
                ,time: 2 //2秒后自动关闭
            });
        }
    }).fail(function () {
        layer.open({
            content: "服务器异常,请退出重试"
            ,skin: 'msg'
            ,time: 2 //2秒后自动关闭
        });
    })
}